<%@tag pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@attribute name="item" required="true" type="cn.livingCloud.dto.PushGroupDto" %>
<td>${item.name}</td>
<td>${item.cronExpression}</td>
<td>${item.reportRuleDto.name}</td>
<td>${item.createDateTime}</td>
<td>
    <c:if test="${not item.state}">
        <span class="label label-success">启用</span>
    </c:if>

    <c:if test="${item.state}">
        <span class="label label-danger">禁用</span>
    </c:if>
</td>
<td>
    <form class="form-inline" action="delete.htm" method="post">
        <input type="hidden" name="uuid" value="${item.uuid}">
        <c:if test="${item.state}">
            <button type="button" class="btn btn-success ChangeState" uuid="${item.uuid}"
                    name="${item.name}" state="false">启用
            </button>
        </c:if>
        <c:if test="${not item.state}">
            <button type="button" class="btn btn-warning ChangeState" uuid="${item.uuid}"
                    name="${item.name}"
                    state="true">禁用
            </button>
            <a class="btn btn-primary"
               href="${contextPath}/admin/report/push_group/bind_member.htm?pushGroupUuid=${item.uuid}">添加粉丝</a>
        </c:if>
        <a class="btn btn-primary" href="edit.htm?uuid=${item.uuid}">编辑</a>
        <button type="submit" class="btn btn-danger" onclick="return confirm('确定删除[${item.name}]?');">
            删除
        </button>
    </form>
</td>